﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Cwjk_PzRuleSet.aspx.vb" Inherits="PubProject.Cwjk_PzRuleSet" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<head runat="server">
    <title>凭证规则设置</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
	<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
	<meta name="vs_defaultClientScript" content="JavaScript">
	<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	<LINK href="/_grid/map_grid.css" type="text/css" rel="stylesheet">
    <script language="javascript" src="/_controls/settings.aspx"></script>
	<link rel="stylesheet" type="text/css" href="/_nav/tabs.css">
	<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
	<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
	<link rel="stylesheet" type="text/css" href="/_nav/taskbox.css">
	<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
	<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
	<link rel="stylesheet" type="text/css" href="/_controls/find/find.css">
	<script language="javascript" src="/_common/scripts/global.js"></script>
	<script language="javascript" src="/_controls/find/find.js"></script>
	<script language="javascript" src="/_controls/util/util.js"></script>
	<script language="javascript" src="/_controls/datetime/date.js"></script>
	<script language="javascript" src="/_controls/number/number.js"></script>
	<!-- GridTree -->
	<link rel="stylesheet" type="text/css" href="/_controls/tree/gridtree.css">
	
	<script language="javascript">
	    var bLoaded = false;
	    var _MyHelpfile = "/Cbgl/Help/topics/财务人员/设置财务接口/设置凭证规则.html";
	    function document.onkeydown()
        {
            try
            {
                if (event.keyCode == 8)
                {
                    var s = event.srcElement.tagName;
                    if (s && s != "INPUT" && s != "TEXTAREA") 
                    {
                        event.returnValue = false;
                    }
                    else if (event.srcElement.type != "text")
                    {
                        event.returnValue = false;
                    }
                    else if (event.srcElement.readOnly)
                    {
                        event.returnValue = false;
                    }
                }
            }
            catch(e){}
        }
	    function window.onload()
	    {
	        var rdNum = Math.random();
	        var strCwztGUID = document.all["__CwztGUID"].value;
	        var strApplication = document.all["__Application"].value;
	        var strHierarchyCode="" ;
	        if (document.all["__HierarchyCode"])
	        {
	           strHierarchyCode = document.all["__HierarchyCode"].value;
	        }
	        //显示业务类型列表
	        var strPath = "/PubProject/Cwjk/Cwjk_PzRuleSet_OperType_Grid.aspx?CwztGUID=" + strCwztGUID + "&Application=" + strApplication + "&HierarchyCode=" + escape(strHierarchyCode) + "&IsAll=0" + "&rdnum=" + rdNum;
	        ifrmOperType.location = strPath ;
	        
	        if(document.all["__IsYC"] && document.all["__IsYC"].value == "1")
	        {
	            loadErrorEntry();
	        }
	        if (document.all["__Application"] && document.all["__Application"].value == "0101")
	        {
	            _MyHelpfile = "/Slxt/Help/topics/财务管理/财务接口设置/设置凭证规则.html";
	        }
	    }
	    function loadErrorEntry()
	    {
	        if (bLoaded)
	        {
	            return;
	        }
	        if (document.all["ifrmOperType"].contentWindow.document.readyState == "complete")
            {
                document.all["tdErrorEntry"].click();
                bLoaded = true;
            }
            else
            {
                window.setInterval("loadErrorEntry()",500);
            }
	    }
	    function chgAll()
	    {
	       var strHierarchyCode = "";

	        var arrTr = ifrmOperType.appGridTree.selectedRow;
	        if (arrTr)
	        {
	            if (arrTr.IsDisable == "True" && !form1.chkAll.checked)
	            {
	                strHierarchyCode = "";
	            }
	            else
	            {
	                strHierarchyCode = arrTr.HierarchyCode;
	            }
	        }
	        refleshGrid(strHierarchyCode);
	    }
	    function refleshGrid(strHierarchyCode)
	    {
	        var rdNum = Math.random();
	        var strCwztGUID = document.all["__CwztGUID"].value;
	        var strApplication = document.all["__Application"].value;
	        
	        //刷新业务类型列表
	        var strPath = "/PubProject/Cwjk/Cwjk_PzRuleSet_OperType_Grid.aspx?CwztGUID=" + strCwztGUID + "&Application=" + strApplication + "&HierarchyCode=" + escape(strHierarchyCode);
	        if (form1.chkAll.checked)
	        {
	            strPath += "&IsAll=1";
	        }
	        else
	        {
	            strPath += "&IsAll=0";
	        }
	        strPath += "&rdnum=" + rdNum;
	        ifrmOperType.location = strPath ;
	    }
	    //
	    function showPzEntryGrid(strOperTypeGUID)
	    {
            var rdNum = Math.random();
            var strPath = "/PubProject/Cwjk/Cwjk_PzRuleSet_EntryEdit.aspx?OperTypeGUID=" + escape(strOperTypeGUID) + "&rdnum=" + rdNum;
            ifrmEntry.location = strPath ;
	    }
	    //显示异常凭证
	    function showErrorEntry()
	    {
	       document.all["tdErrorEntry"].bgColor = "#CAD3E4";
	       try
	       {
	           var arrTr = ifrmOperType.appGridTree.selectedRow;
               if(arrTr)
               {
                    arrTr.bgColor = "#FFFFFF";
                    ifrmOperType.deDisplay("cAdd,cDelete,cEnabled,cDisabled");
               }
	       }
	       catch(e)
	       {}	       
	       var rdNum = Math.random();
	       var strCwztGUID = document.all["__CwztGUID"].value;
	       var strPath = "/PubProject/Cwjk/Cwjk_PzRuleSet_ErrorEntry.aspx?CwztGUID=" + escape(strCwztGUID) + "&rdnum=" + rdNum;
	       ifrmEntry.location = strPath ;
	    }	    
	</script>
</head>
<body style="MARGIN: 5px" MS_POSITIONING="FlowLayout">
    <form id="form1" runat="server">
    <table style="TABLE-LAYOUT: fixed; FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
        <colgroup>
			<col width="250">
			<col width="10">
			<col>
		</colgroup>
        <tr>
            <td>
                <Table style="TABLE-LAYOUT: fixed; FONT-SIZE: 9pt;BORDER:#889DC2 1px solid;" height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
                    <tr >
                        <td vAlign="top"><iframe id="ifrmOperType" name="ifrmOperType" src="" frameBorder="no" width="100%" scrolling="no" height="100%"></iframe></td>
                    </tr>
                    <tr height="3px">
                        <td></td>
                    </tr>
                    <tr height="24px">
                        <td style="FONT-SIZE: 9pt;cursor:hand" id="tdErrorEntry" onclick="showErrorEntry()">&nbsp;异常凭证预警（<asp:label id="lbl_ErrorPzNum" runat="server" text="0"></asp:label>）</td>
                    </tr>
                    <tr height="3px">
                        <td></td>
                    </tr>
                    <tr height="24px">
                        <td><input type="checkbox" id="chkAll" onclick="chgAll()"><label for="chkAll">显示所有</label></td>
                    </tr>
                    <tr height="3px">
                        <td></td>
                    </tr>
                </table>
            </td>
            <td></td>
            <td >
                <iframe id="ifrmEntry" name="ifrmEntry" src="Cwjk_PzRuleSet_EntryEdit.aspx" frameBorder="no" width="100%" scrolling="no" height="100%"></iframe>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
